/**
 * 👨‍💻 伟谭
 * 📅 2017/7/1
 */

#import "LXHLXHLongXiangHuiHomelayoutGroupBodyJsonModel.h"

@protocol LXHLXHLongXiangHuiHomelayoutGroupBodyJsonModel <NSObject>


@end

@implementation LXHLXHLongXiangHuiHomelayoutGroupBodyJsonModel

#pragma mark - Class method

#pragma mark - Life cycle

#pragma mark - Override

#pragma mark - Event response

#pragma mark - Protocol

#pragma mark <<#XXXDelegate#>>

#pragma mark - Public method

#pragma mark - Private method

#pragma mark - Getter & Setter
-(void)setTopLeftBottonRightSpace:(NSString<Optional> *)topLeftBottonRightSpace {
    _topLeftBottonRightSpace = [topLeftBottonRightSpace copy];
    self.topLeftBottonRightSpaceEdge = UIEdgeInsetsFromString(topLeftBottonRightSpace);
}

-(CGFloat)theTotalGapWidth {
    return self.topLeftBottonRightSpaceEdge.left + self.topLeftBottonRightSpaceEdge.right + (self.numberOfLlevels-1)*self.levelOfspace;
   
}

-(CGSize)itemSize {
     
    CGFloat width;
    if(self.controlTheWidth <= 0.0f){
         width = (WIDTH - self.theTotalGapWidth) /self.numberOfLlevels;
    }else {
        width = (self.controlTheWidth - self.theTotalGapWidth) /self.numberOfLlevels;
    }
    
    CGFloat height = width * self.heightMultipleByWidth + self.heightOfByWidth;
    
    return  CGSizeMake(width, height);
}

@end
